home *** CD-ROM | disk | FTP | other *** search
/ Night Owl 6 / Night Owl's Shareware - PDSI-006 - Night Owl Corp (1990).iso / 016a / find13.zip / FIND.DOC < prev    next >
Text File  |  1991-12-26  |  7KB  |  185 lines

  1.  
  2.  
  3.       Dec 23, 1991                                              Page 1
  4.  
  5.  
  6.  
  7.                            FIND.EXE Version 1.30
  8.  
  9.       FIND Version 1.30 is a MS-DOS (tm) tool for file maintenance.
  10.       Its roots began in UNIX (tm).  FIND can be used as a stand
  11.       alone tool or embedded into a batch program to maintain file
  12.       systems.  FIND V1.30 is not only used to locates files but can
  13.       be used to execute other programs.
  14.  
  15.       FIND V1.30 recursively works its way down the directory
  16.       hierarchy to locate files.  It can find files by name, type,
  17.       size, age, or a combination of name, type, size or age.   Once
  18.       found, the file can be printed or be part of an execution
  19.       command.  Included in batch files, FIND V1.30 is useful for
  20.       removing old files in TMP directories or old BAK files.  Since
  21.       find can determine age, find can be used in batch files to run
  22.       utilities periodically.
  23.  
  24.       FIND V1.30 is faster and has been enhanced with new features
  25.       as well as bug fixes.  FIND V1.30 can look for files not
  26.       matching a pattern or patterns.  FIND V1.30 can print out a
  27.       count of matching files as well as the total file size.  Commands
  28.       that take an argument after the file name, such as del file /p
  29.       can now be executed.  Path and file names are now printed in
  30.       lower case.
  31.  
  32.       Files included in the archive are:
  33.  
  34.       find.me       This file
  35.       find.exe      find exec file
  36.       batch.bat     an example of find used in a batch file
  37.       readme.txt    read me file
  38.  
  39.       USE:
  40.  
  41.       find <dir lst> [!] -name <name lst> -type <ahrs> -size n
  42.                          -mtime d \ -print -exec <cmd> -count -du
  43.  
  44.       <dir lst>          is a list of one or more path names.
  45.  
  46.       -name <name lst>   is true if a file in the name list matches
  47.                          a file in the directory list.  Wildcard
  48.                          characters (* and ?) are allowed.
  49.                          Preceding -name with a ! character, cause
  50.                          the list to look for files that do not
  51.                          match the name list.
  52.  
  53.       -type ahrs         is true if the file is type c, where c is
  54.                          a for archived, h for hidden, r for
  55.                          readonly or s for system.  Using two or
  56.                          more file types is treated as an assumed
  57.                          AND operation.  For example, -type hs will
  58.                          find files that are hidden system files.
  59.  
  60.  
  61.  
  62.  
  63.  
  64.       Dec 23, 1991                                              Page 2
  65.  
  66.  
  67.  
  68.       -size n            is true if the file is n character
  69.                            +n means larger than n characters and
  70.                            -n means smaller than n characters.
  71.                             n means exactly n characters.
  72.  
  73.       -mtime d           is true if the file is d days old. Where
  74.                            +d means older than d days
  75.                            -d means newer than d days
  76.                             d means exactly d days.
  77.  
  78.       -print             prints the path and file name.
  79.  
  80.       -exec  <cmd>       executes cmd.  If arguments are required
  81.                          to the command, double quote the command
  82.                          and arguments.  For example -exec "rm -i"
  83.                          will run the UNIX like remove command
  84.                          prompting the user for an OK to delete each
  85.                          file found.
  86.  
  87.                          If arguments are required after the file
  88.                          name, such as DEL file /P, use an ampersand
  89.                          to mark the location of the file name.  The
  90.                          command MUST be double quoted.  For example
  91.                          -exec "del & /p"
  92.  
  93.       -count             prints the count of all files found
  94.                          matching input criteria.
  95.  
  96.       -du                prints the total size in bytes of all file
  97.                          matching input criteria.
  98.  
  99.       EXAMPLES
  100.           To remove all files that are older than 6 days in the
  101.           C:\TMP and C;\WIN\TMP paths.
  102.  
  103.                 find c:\tmp c:\win\tmp -mtime +6 -exec del
  104.  
  105.           To remove all files that are older than 6 days in the
  106.           C:\TMP and be prompted for an OK to delete.
  107.  
  108.                 find c:\tmp -mtime +6 -exec "del & /p"
  109.  
  110.           To find all files ending in .c and .h:
  111.  
  112.                 find c:\ -name *.c *.h -print
  113.  
  114.           To find all files not ending in .c and .h:
  115.  
  116.                 find c:\ ! -name *.c *.h -print
  117.  
  118.           To count the number of files matching *.C and *.H and
  119.           print the total size in bytes:
  120.  
  121.                 find c:\ -name *.c *.h -count -du
  122.  
  123.  
  124.  
  125.  
  126.  
  127.       Dec 23, 1991                                              Page 3
  128.  
  129.  
  130.  
  131.       Differences between the MS-DOS version and the UNIX version:
  132.           The or operator, -o, is not supported.
  133.  
  134.           Expressions inside () are not supported.
  135.  
  136.           The -exec command does not take a semicolon and
  137.           the path name does not take the {} syntax.
  138.  
  139.           The path list does not support file names.
  140.  
  141.           The -count and -du options are not found in the UNIX
  142.           version.
  143.           
  144.           The ampersand "&" is not found in UNIX.
  145.  
  146.       The following arguments are not supported (generally
  147.       because they are not found in the MS-DOS file
  148.       system.)
  149.  
  150.           -prem          -link          -user
  151.           -group         -atime         -ctime
  152.           -ok            -depth
  153.  
  154.       There may be other differences that are either unique to UNIX
  155.       or limited by MS-DOS.  This version was not intended to be an
  156.       exact replacement for the UNIX version.  If you would like
  157.       other feature, please document them and send them to me via
  158.       Compuserve.  Please provide me with a description of the
  159.       feature and an example of the command line and the desired
  160.       result(s).
  161.  
  162.       Copyright (c) 1991 by Julian C. Snow.  All Rights Reserved.
  163.       Written and uploaded to Compuserve by:
  164.  
  165.       Julian C. Snow
  166.       4170 N. Marine Dr. #7A
  167.       Chicago, Il 60613
  168.       Compuserve 76176,127
  169.  
  170.       If this program has been useful to you, please register!
  171.       Your input about future enhancements will be highly valued.
  172.       To register, send $5 to the above address.  All registrations
  173.       are appreciated.
  174.  
  175.       This program may be distributed freely.  If it is distributed,
  176.       this file (find.doc) must be included.  The copyright holder
  177.       offers no warranty with this code at all, including its
  178.       fitness for any particular purpose.  Neither shall he be
  179.       liable for damages of any kind that may arise from its use.
  180.  
  181.       UNIX is a trademark of AT&T.
  182.       MS-DOS is a trademark of Microsoft Corporation
  183.  
  184.       Julian C. Snow
  185.